def test1(tempVar1,tempVar2):
    #防御编程
    if type(tempVar1)!=int and  type(tempVar2)!=int:
        print("参数必须是整数")
    elif tempVar2==0:
        print('ZeroDivisionError')
    else:
        print('step1',tempVar1/tempVar2)
        print('step2')
        print('step3')


def test3():
    tempVar3 = test1(10,0)
    try:
        tempVar3 = tempVar3 + 1
        print(tempVar3)
    except:
        print("something wrong")

def test4():
    tempVar3 = test1(10, 0)
    if tempVar3==None or type(tempVar3)!=int:
        print("something is wrong")
    else:
        print(tempVar3 + 1)

def test2(tempVar1,tempVar2):
    result = None
    try:
        print('step1')
        result = print(tempVar1 / tempVar2)
    except:
        print('error')
    else:
        print('step2')
    finally:
        print('step3')
        return result

if  __name__ == "__main__":
    test1(10,0)
    test1('afafd','c')
    test2('afafd','c')
    test3()
    test4()